package com.hospital;

import io.rong.imkit.RongIM;
import android.content.Context;

/**
 * Created by Bob on 2015/1/30.
 */
public class DemoContext {

	private static DemoContext mDemoContext;
	public Context mContext;
	private RongIM.LocationProvider.LocationCallback mLastLocationCallback;

	public static DemoContext getInstance() {

		if (mDemoContext == null) {
			mDemoContext = new DemoContext();
		}
		return mDemoContext;
	}

	private DemoContext() {
	}

	private DemoContext(Context context) {
		mContext = context;
		mDemoContext = this;
	}

	public static void init(Context context) {
		mDemoContext = new DemoContext(context);
	}

	public RongIM.LocationProvider.LocationCallback getLastLocationCallback() {
		return mLastLocationCallback;
	}

	public void setLastLocationCallback(RongIM.LocationProvider.LocationCallback lastLocationCallback) {
		this.mLastLocationCallback = lastLocationCallback;
	}

}
